import Storage from 'storage';

const state = {
  menus: Storage.getSession('menus'),
};

const getters = {
  menus: state => state.menus
};

const actions = {
  setMenus({
    commit
  }, menus) {
    commit('setMenus', menus);
  }
};

const mutations = {
  setMenus(state, menus) {
    Storage.setSession('menus', menus);
    state.menus = menus;
  }
};

export default {
  state,
  getters,
  actions,
  mutations
};
